﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using CCNetTest.Core;
using NUnit.Framework;
namespace CCNetTest.Test.NUnit {
    [TestFixture]
    class MyMainClassTest {
        [Test]
        public void AddTest() {
            var m = new MyMainClass();
            m.A = 1;
            m.B = 2;
            int expect = 3; 
            int actual = m.Add();
            Assert.AreEqual(expect,actual);
        }


        [Test]
        public void SubTest( ) {
            MyMainClass target = new MyMainClass( ) { A = 1, B = 3 };
            int expected = -2;
            int actual;
            actual = target.Sub( );
            Assert.AreEqual(expected, actual);
        }

        [Test]
        public void FailTest() {
            MyMainClass target = new MyMainClass( ) { A = 1, B = 3 };
            int expected = 1;
            int actual;
            actual = target.Add( );
            Assert.AreNotEqual(expected, actual);
        }
    }
}
